<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html lang="zh-CN">
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
	<meta charset="UTF-8">
	<title>凯盛项目管理系统</title>
	<link rel="stylesheet" type="text/css" href="css/bootstrap.min.css">
</head>
<body class="body">
	<%@ include file="nav.jsp" %>
	<div class="container">
	  <div class="row">
		<div class="span9">
			<form class="form-horizontal" action="task.jspx" method="post">
			<input type="hidden" name="_m" value="update"/>
			<input type="hidden" name="id" value="${requestScope.task.id }"/>
        <fieldset>
          <legend>编辑任务</legend>
          <div class="control-group">
            <label class="control-label" for="input01">任务名称</label>
            <div class="controls">
              <input type="text" class="span5" id="input01" x-webkit-speech="undefined" name="name" value="${requestScope.task.name }">
              <p class="help-block">In addition to freeform text, any HTML5 text-based input appears like so.</p>
            </div>
          </div>
          <div class="control-group">
            <label class="control-label" for="input01">开始时间</label>
            <div class="controls">
              <input type="text" class="span5" id="input01" x-webkit-speech="undefined" name="begintime" value="${requestScope.task.begintime }">
            </div>
          </div>
          <div class="control-group">
            <label class="control-label" for="input01">截止时间</label>
            <div class="controls">
              <input type="text" class="span5" id="input01" x-webkit-speech="undefined" name="endtime" value="${requestScope.task.endtime }">
            </div>
          </div>
          <div class="control-group">
            <label class="control-label" for="input01">任务描述</label>
            <div class="controls">
              <textarea class="span5" rows="8" name="desc">${requestScope.task.desc }</textarea>
            </div>
          </div>
          <div class="control-group">
            <label class="control-label" for="multiSelect">状态</label>
            <div class="controls">
              <select id="multiSelect" name="state">
              	<c:choose>
              		<c:when test="${requestScope.task.state == 'new' }">
              				<option value="new" selected="selected">新任务</option>
              		</c:when>
              		<c:otherwise>
              			<option value="new">新任务</option>
              		</c:otherwise>
              	</c:choose>
              	
              	<c:choose>
              		<c:when test="${requestScope.task.state == 'going' }">
              			<option value="going" selected="selected">进行中</option>
              		</c:when>
              		<c:otherwise>
              			<option value="going">进行中</option>
              		</c:otherwise>
              	</c:choose>
              	
              	<c:choose>
              		<c:when test="${requestScope.task.state == 'over' }">
              				<option value="over" selected="selected">已完成</option>
              		</c:when>
              		<c:otherwise>
              			<option value="over">已完成</option>
              		</c:otherwise>
              	</c:choose>
                
              </select>
            </div>
          </div>
          <div class="control-group">
            <label class="control-label" for="multiSelect">级别</label>
            <div class="controls">
              <select id="multiSelect" name="level">
              	<c:choose>
              		<c:when test="${requestScope.task.level == '1' }">
              			 <option value="1" selected="selected">重要紧急</option>
              		</c:when>
              		<c:otherwise>
              			 <option value="1">重要紧急</option>
              		</c:otherwise>
              	</c:choose>
              	
              	<c:choose>
              		<c:when test="${requestScope.task.level == '2' }">
              			 <option value="2" selected="selected">重要不紧急</option>
              		</c:when>
              		<c:otherwise>
              			 <option value="2">重要不紧急</option>
              		</c:otherwise>
              	</c:choose>
              	
              	<c:choose>
              		<c:when test="${requestScope.task.level == '3' }">
              			 <option value="3" selected="selected">紧急不重要</option>
              		</c:when>
              		<c:otherwise>
              			 <option value="3">紧急不重要</option>
              		</c:otherwise>
              	</c:choose>
              	
              	<c:choose>
              		<c:when test="${requestScope.task.level == '4' }">
              			 <option value="4" selected="selected">不紧急不重要</option>
              		</c:when>
              		<c:otherwise>
              			 <option value="4">不紧急不重要</option>
              		</c:otherwise>
              	</c:choose>
               
              </select>
            </div>
          </div>
          <div class="control-group">
            <label class="control-label" for="multiSelect">负责人</label>
            <div class="controls">
              <select id="multiSelect" name="manager">
              	<option value=""></option>
                <c:forEach items="${requestScope.emList }" var="em">
                	<c:choose>
                		<c:when test="${requestScope.task.employeeid == em.id }">
                			<option value="${em.id }" selected="selected">${em.name }</option>
                		</c:when>
                		<c:otherwise>
                			<option value="${em.id }">${em.name }</option>
                		</c:otherwise>
                	</c:choose>
					
				</c:forEach>
              </select>
            </div>
          </div>
          
          <div class="control-group">

            <label class="control-label" for="input01">当前进度</label>

            <div class="controls">

              <input type="text" class="span5" id="input01" x-webkit-speech="undefined" name="rate" value="${requestScope.task.rate }">

            </div>

          </div>
          
          
          <div class="form-actions">
            <button type="submit" class="btn btn-primary">保存</button>
            <button class="btn" onclick="location.back()">返回</button>
          </div>
        </fieldset>
      </form>          
          	
		</div>
		<div class="span3">
			
		</div>
	  </div>
	</div>

</body></html>